import { getUUID } from "../utils";
export const getWords = () => {
    return new Promise(resolve => {
        const sotredWords = localStorage["words"];
        if (sotredWords) {
            resolve(JSON.parse(sotredWords));
        } else {
            const words = Array.from({ length: 3 }, (_, index) => ({ id: getUUID(), num: index + 1, content: "" }));
            localStorage["words"] = JSON.stringify(words);
            resolve(words);
        }
    });
};
